import os
import sys
import argparse

SIFIVE_OE = '~/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/build'

parser = argparse.ArgumentParser()

parser.add_argument('-u', '--user', default='lingkong', help='specify user')
args = parser.parse_args()
print(args.user)

U_BOOT_FILES = [ 'u-boot', 'u-boot.map', 'u-boot.bin' ]

for f in U_BOOT_FILES:
    RSYNC_CMD = 'rsync --progress %s@10.12.130.34:%s/%s .' % (args.user, SIFIVE_OE, f)
    print(RSYNC_CMD)
